Skip to content

Conversation

@shahzan01
Copy link
Collaborator

@shahzan01 shahzan01 commented Jun 2, 2025

PR: Implement Open Graph (OG) Plugin for Joomla SEO

Description

This PR introduces the System – OpenGraph Plugin into the joomla-projects/jacademy25_seo repository.
The plugin provides automatic Open Graph (OG) and related social metadata generation for Joomla pages, ensuring rich previews on social media platforms and improving SEO.

Approach

The feature has been developed incrementally to align with Joomla’s architecture and maintain stability.

Key Features

  1. Category-Level Mappings, Article & Menu-Level Overrides, and Global Fallbacks

    • Map og:title, og:description, og:image, and og:image:alt at the category level.
    • Override values at the article level for fine-grained control.
    • Menu item overrides take the highest priority for specific pages.
    • Global defaults act as the final fallback when no overrides or mappings are set.
  2. Admin & Editor-Friendly UI

    • Dedicated OpenGraph tabs in articles, categories, and menu items.
    • Placeholder indicators show the current value and its source Field.
    • Grouped custom fields (text, image, image-alt) for consistency.
  3. Developer Integration via OpengraphServiceInterface & MappableFieldInterface
    Developers can make their own custom fields available for OpenGraph mapping by implementing a simple interface:

    • Step 1: Extend your custom field class with OpenGraphMappableFieldInterface.
    • Step 2: Implement the getOpengraphGroup() function.
    • Step 3: In that function, return the OpenGraph group where you want your custom field to appear:
      • TEXT → for text-based OG fields (e.g., title, description).
      • IMAGE → for image fields (e.g., og:image).
      • IMAGE_ALT → for alt-text fields (e.g., og:image:alt).

Status

  • ✅ Repository setup complete
  • ✅ Manifest & language files created
  • ✅ Global defaults, category mapping, and override hierarchy implemented
  • ✅ Admin UI tabs for articles, menus, and categories
  • 🛠 Testing on different page types (home, article, category, menu overrides)
  • 🔜 Validation via Facebook/Twitter/LinkedIn debugger tools

Goal

To ensure automatic, accurate, and fully customizable Open Graph metadata for all site pages, improving shareability on platforms like Facebook, Twitter, and LinkedIn, while boosting the SEO-friendliness of the Joomla site.

shahzan01

This comment was marked as resolved.

shahzan01 added 21 commits June 16, 2025 16:46
@shahzan01 shahzan01 changed the title feat: Initial Implementation of Auto Open Graph (OG) Tag Generation feat: Initial Implementation of Open Graph (OG) Plugin Aug 19, 2025
@bembelimen bembelimen deleted the branch main September 12, 2025 12:04
@bembelimen bembelimen closed this Sep 12, 2025
@bembelimen bembelimen reopened this Sep 12, 2025
@bembelimen bembelimen requested a review from Copilot September 19, 2025 09:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the System – OpenGraph Plugin for Joomla, enabling automatic generation of Open Graph and Twitter Card metadata for improved social media sharing. The plugin implements a hierarchical override system with global defaults, category-level mappings, article overrides, and menu item overrides taking the highest priority.

  • Hierarchical metadata system supporting global defaults, category mappings, article forms, and menu overrides
  • Admin UI integration with dedicated OpenGraph tabs for articles, categories, and menu items
  • Developer integration interface allowing custom fields to be made available for OpenGraph mapping

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
plugins/system/opengraph/src/Extension/opengraph.php Main plugin class implementing metadata generation and form integration
plugins/system/opengraph/src/Field/OpengraphField.php Custom field type for selecting mappable fields in admin forms
plugins/system/opengraph/src/forms/ XML form definitions for OpenGraph configuration tabs
plugins/system/opengraph/opengraph.xml Plugin manifest with configuration options
plugins/system/opengraph/language/ Language files for admin interface
libraries/src/Opengraph/OpengraphServiceInterface.php Interface for components to provide mappable fields
build/media_source/plg_system_opengraph/ JavaScript and asset configuration for admin placeholder functionality
administrator/components/com_*/src/Extension/*Component.php Implementation of OpengraphServiceInterface in core components

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@shahzan01 shahzan01 requested a review from Copilot October 1, 2025 13:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@shahzan01 shahzan01 requested a review from Copilot October 1, 2025 15:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 10 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants